Skip to content

Migrate from Poetry to uv #444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Migrate from Poetry to uv #444

wants to merge 3 commits into from

Conversation

t41372
Copy link

@t41372 t41372 commented May 4, 2025

This pull request migrates the project from Poetry to UV, following the discussion in #420.

Note: I have not updated the GitHub Actions workflows yet, as I’m less familiar with CI/CD pipelines. The current workflows still rely on Poetry, so we’ll need to address that before merging to ensure everything runs smoothly.

✅ What’s been done:

  • Migrated both graphiti-core and graph-service to use UV for dependency management.
  • Updated the Dockerfile to use UV. This also resolves Current Docker setup appears broken #439; the image now builds and runs successfully.
  • Updated README and CONTRIBUTING docs to reflect the switch to UV.

🚧 What’s not done:

  • GitHub Actions workflows are still using Poetry and have not been migrated to UV.

Important

Migrated project from Poetry to UV for dependency management, updating Dockerfile, Makefile, and documentation, but GitHub Actions workflows still need migration.

  • Dependency Management:
    • Migrated from Poetry to UV in graphiti-core and graph-service.
    • Updated pyproject.toml to use UV's dependency group format.
  • Dockerfile:
    • Replaced Poetry with UV for building and installing dependencies.
    • Added UV-specific environment variables for performance.
  • Makefile:
    • Replaced Poetry commands with UV commands for installing, testing, and linting.
  • Documentation:
    • Updated README.md and CONTRIBUTING.md to reflect the switch to UV.
  • Pending:
    • GitHub Actions workflows still use Poetry and need migration to UV.

This description was created by Ellipsis for be017fd. You can customize this summary. It will automatically update as commits are pushed.

t41372 added 3 commits May 4, 2025 14:43
What's done?
- A working docker image and build process rewritten to use uv instead of poetry.
- This commit fixed (getzep#439)
- Updated lock files

(for `server`, graph-service):
- Updated pyproject.toml that is compatible with uv.
- updated Makefile

Why?
- This is a part of the pull request to migrate from Poetry to UV.
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to be017fd in 1 minute and 40 seconds. Click for details.
  • Reviewed 1424 lines of code in 9 files
  • Skipped 1 files when reviewing.
  • Skipped posting 17 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. CONTRIBUTING.md:56
  • Draft comment:
    Updated installation instructions to use uv instead of Poetry. Verify that contributing docs elsewhere mention correct UV usage.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 80% None
2. Dockerfile:2
  • Draft comment:
    Using uv base image and setting performance toggles looks good. Confirm that the chosen uv image tag meets all project requirements.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 80% None
3. Dockerfile:14
  • Draft comment:
    Ensure that copying all source files (pyproject.toml, uv.lock, README.md, and directories) preserves file permissions as expected.
  • Reason this comment was not posted:
    Confidence changes required: 20% <= threshold 80% None
4. Dockerfile:20
  • Draft comment:
    Creation and activation of the virtual environment using 'uv venv' is appropriate. Validate that subsequent uv pip commands use this venv correctly.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 80% None
5. Dockerfile:27
  • Draft comment:
    Separate installation of graphiti-core (editable) and the FastAPI server package is clear. Confirm dependency resolution order doesn’t introduce conflicts.
  • Reason this comment was not posted:
    Confidence changes required: 10% <= threshold 80% None
6. Makefile:4
  • Draft comment:
    Variable renaming from POETRY to UV is correctly propagated. Ensure all commands in the workflow are tested with uv.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 80% None
7. pyproject.toml:33
  • Draft comment:
    Dependency groups are now specified under [dependency-groups]. Ensure that the build-system integration with uv is correct despite still relying on poetry-core.
  • Reason this comment was not posted:
    Confidence changes required: 40% <= threshold 80% None
8. server/Makefile:4
  • Draft comment:
    Server Makefile updates reflect the migration to uv successfully. Confirm that linting and type-checking commands behave as expected.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 80% None
9. server/pyproject.toml:28
  • Draft comment:
    The server project’s pyproject.toml now uses the [project] format. Verify that the use of 'graphiti-core @ ../' correctly resolves the dependency from the local path.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 80% None
10. server/pyproject.toml:28
  • Draft comment:
    As with the core project, the build system still references poetry-core. Confirm this aligns with the uv migration strategy.
  • Reason this comment was not posted:
    Confidence changes required: 40% <= threshold 80% None
11. CONTRIBUTING.md:56
  • Draft comment:
    Updated install instructions now reference uv instead of Poetry. This is clear and follows the migration.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 80% This comment is purely informative and does not provide any actionable feedback or suggestions for improvement. It simply acknowledges a change that was made, which violates the rule against making purely informative comments.
12. Dockerfile:1
  • Draft comment:
    The Dockerfile now uses the uv builder image and uv commands (e.g., 'uv venv', 'uv pip install'). Verify that the uv.lock file is maintained and that the server code path (/app/server/graph_service) matches the expected structure.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 80% The comment is asking the PR author to verify certain aspects of the Dockerfile changes, which violates the rule against asking the author to confirm or verify intentions. It does not provide a specific suggestion or point out a clear issue with the code. Therefore, it should not be approved.
13. README.md:136
  • Draft comment:
    Added snippet for 'uv add graphiti-core' is clear. Consider indicating if uv is now the preferred dependency manager and if Poetry instructions will be deprecated to avoid confusion.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 80% This comment is asking for clarification on the preferred dependency manager, which is not allowed as per the rules. It doesn't provide a specific code suggestion or ask for a test to be written. Therefore, it should be removed.
14. pyproject.toml:55
  • Draft comment:
    The dependency groups have been updated, but the [build-system] section still uses poetry-core. Confirm whether this is intentional or if the build backend should change with the migration to uv.
  • Reason this comment was not posted:
    Comment was on unchanged code.
15. server/Makefile:15
  • Draft comment:
    Makefile commands have been updated to use uv (e.g., 'uv sync --group dev', 'uv run pytest'). Ensure that these uv commands work as expected for managing dependencies and running tests.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 80% This comment is asking the PR author to ensure that the uv commands work as expected, which violates the rule against asking the author to confirm or ensure behavior. It doesn't provide a specific suggestion or point out a specific issue.
16. Makefile:25
  • Draft comment:
    There is a trailing whitespace at the end of line 25 (after '--pretty'). Please remove the trailing whitespace to maintain consistency and avoid needless diff noise in future edits.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
17. README.md:196
  • Draft comment:
    Typographical error: 'OpenAi-compatible' should be 'OpenAI-compatible' for consistency in spelling.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_5Epd0I6v8xB6Mvc9

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Current Docker setup appears broken
1 participant